# !/usr/bin/env python3
# -*- coding: utf-8 -*-
from wtforms.validators import DataRequired

__author__ = 'InG_byr'

from flask.ext.wtf import Form
from wtforms import StringField, PasswordField, validators, SubmitField
from flask_wtf.file import FileField, FileRequired, FileAllowed


class MessageForm(Form):
    body = StringField('message body', [validators.Length(min=2, max=256)])


class LoginForm(Form):
    user_id = StringField('user id', [validators.Length(min=4, max=20)])
    password = PasswordField('password', [validators.Length(min=4, max=20)])


class PhotoForm(Form):
    presentation = FileField('Presentation in Image Format',
                             validators=[FileRequired(), FileAllowed(['jpg', 'png'], 'Images only!')])
    submit = SubmitField("Send")


class BlackHostForm(Form):
    """
    Put the mac address in
    """
    mac_address = StringField('mac_address', validators=[DataRequired()])


class VerifyRoute(Form):
    src_host = StringField('src_host', validators=[DataRequired()])
    dst_host = StringField('dst_host', validators=[DataRequired()])
